<?php
foreach ($user as $me) {
    if ($me['image'] == null)
        $me['image'] = "http://localhost/default.png";
    echo $this->Html->image($me['image']);
    echo $me['username'] . "  ";

    if ($me['twitter'] != null) {

        //echo $this->Html->image('http://localhost/twitter.png');
        ?> <a href=<?php echo $me['twitter']; ?>><?php echo $this->Html->image('http://localhost/twitter.png');
        ; ?></a> <?php
    }
    if ($me['facebook'] != null) {
        ?> <a href=<?php echo $me['facebook']; ?>><?php echo $this->Html->image('http://localhost/facebook.png');
        ; ?></a> <?php }
    ?>
    <br> <?php
}